@extends('admin.layouts.index')
@section('title', '外链列表')

@section('content')
<link rel="stylesheet" href="/assets/css/daterangepicker.css">
<script src="/assets/moment/moment.js"></script>
<script src="/assets/moment/locale/zh-cn.js"></script>
<script src="/js/daterangepicker.js"></script>
<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body">
                <form class="m-search" method="GET" action="#">
                    <div class="m-search-items">
                        <div class="m-search-item">
                            <a href="/admin/users/domain_add" class="button"><i class="iconfont icon-jiahao"></i>添加自有域名</a>
                        </div>
                    </div>
                </form>
                <table class="table table-bordered table-nowrap">
                    <thead>
                        <tr>
                            <th scope="col">域名</th>
                            <th scope="col">创建时间</th>
                            <th scope="col">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        @forelse($usersDomains as $usersDomain)
                        <tr>
                            <td>{{ $usersDomain->domain }}</td>
                            <td>{{ $usersDomain->created_at }}</td>
                            <td>
                                <a href="{{ url('/admin/users/domain_delete',['id'=>$usersDomain->id]) }}" class="text-danger">删除域名</a>
                            </td>
                        </tr>
                        @empty
                        <tr>
                            <td colspan="3">当前暂未绑定自有域名!</td>
                        </tr>
                        @endforelse
                    </tbody>
                </table>

            </div>
        </div>
    </div>
</div>
@endsection
